package com.epwk.action;


import com.epwk.driver.SeleniumDriver;
import com.epwk.logger.LoggerControler;

import static com.epwk.driver.SeleniumDriver.driver;

/**
 * Created by Administrator on 2016/11/13.
 */
public class WindowAction extends SeleniumDriver {
    final static LoggerControler log= LoggerControler.getLogger(WindowAction.class);


    public static void switchWindow(){
        String handle = driver.getWindowHandle();
        for(String handles:driver.getWindowHandles()){
            if(handles.equals(handle))
                continue;
            driver.switchTo().window(handles);
        }
        log.info("窗口切换");
    }

}
